﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;

namespace ASG.CodeGenerator.SQL.TSQL
{
    public class SQLDatabaseCode : DatabaseCode<SQLTableCode, SQLColumnCode,SQLProcedureCode,SQLParameterCode, SqlParameter>
    {
        private List<SQLTableCode> _Tables = new List<SQLTableCode>();
        private List<SQLProcedureCode> _Procedures = new List<SQLProcedureCode>();
        private Int16 _DatabaseID;
        private DateTime _CreationDate;
        private DatabaseSize _Size;
        private DatabaseSize _LogSize;
        private SQLCollations _Collation = SQLCollations.Latin1_General_CS_AS;
        private RecoveryModels _RecoveryModel = RecoveryModels.Full;
        private DefaultCursors _DefaultCursor = DefaultCursors.Global;
        private Parameterizations _Parameterization = Parameterizations.Simple;
        private PageVerificationOptions _PageVerificationOption = PageVerificationOptions.CheckSum;
        private bool blnANSI_NULLS = false;
        private bool blnARITHABORT = false;
        private bool blnAUTO_CLOSE = false;
        private bool blnREAD_WRITE = true;
        private bool blnMULTI_USER = true;
        private bool blnDB_CHAINING = false;
        private bool blnAUTO_SHRINK = false;
        private bool blnTRUSTWORTHY = false;
        private bool blnANSI_PADDING = false;
        private bool blnENABLE_BROKER = false;
        private bool blnANSI_WARNINGS = false;
        private bool blnANSI_NULL_DEFAULT = false;
        private bool blnQUOTED_IDENTIFIER = false;
        private bool blnRECURSIVE_TRIGGERS = false;
        private bool blnNUMERIC_ROUNDABORT = false;
        private bool blnAUTO_UPDATE_STATISTICS = true;
        private bool blnCURSOR_CLOSE_ON_COMMIT = false;
        private bool blnAUTO_CREATE_STATISTICS = true;
        private bool blnCONCAT_NULL_YIELDS_NULL = false;
        private bool blnALLOW_SNAPSHOT_ISOLATION = false;
        private bool blnAUTO_UPDATE_STATISTICS_ASYNC = false;
        private bool blnDATE_CORRELATION_OPTIMIZATION = false;

        public Int16 DatabaseID
        {
            get { return _DatabaseID; }
            set { _DatabaseID = value; }
        }

        public DateTime CreationDate
        {
            get { return _CreationDate; }
            set { _CreationDate = value; }
        }

        public DatabaseSize Size
        {
            get { return _Size; }
            set { _Size = value; }
        }

        public DatabaseSize LogSize
        {
            get { return _LogSize; }
            set { _LogSize = value; }
        }

        public SQLCollations Collation
        {
            get { return _Collation; }
            set { _Collation = value; }
        }

        public DefaultCursors DefaultCursor
        {
            get { return _DefaultCursor; }
            set { _DefaultCursor = value; }
        }

        public Parameterizations Parameterization
        {
            get { return _Parameterization; }
            set { _Parameterization = value; }
        }

        public RecoveryModels RecoveryModel
        {
            get { return _RecoveryModel; }
            set { _RecoveryModel = value; }
        }

        public PageVerificationOptions PageVerificationOption
        {
            get { return _PageVerificationOption; }
            set { _PageVerificationOption = value; }
        }

        public bool ANSI_NULL_DEFAULT
        {
            get { return blnANSI_NULL_DEFAULT; }
            set { blnANSI_NULL_DEFAULT = value; }
        }

        public bool ANSI_NULLS
        {
            get { return blnANSI_NULLS; }
            set { blnANSI_NULLS = value; }
        }

        public bool ANSI_PADDING
        {
            get { return blnANSI_PADDING; }
            set { blnANSI_PADDING = value; }
        }

        public bool ANSI_WARNINGS
        {
            get { return blnANSI_WARNINGS; }
            set { blnANSI_WARNINGS = value; }
        }

        public bool ARITHABORT
        {
            get { return blnARITHABORT; }
            set { blnARITHABORT = value; }
        }

        public bool AUTO_CLOSE
        {
            get { return blnAUTO_CLOSE; }
            set { blnAUTO_CLOSE = value; }
        }

        public bool AUTO_CREATE_STATISTICS
        {
            get { return blnAUTO_CREATE_STATISTICS; }
            set { blnAUTO_CREATE_STATISTICS = value; }
        }

        public bool AUTO_SHRINK
        {
            get { return blnAUTO_SHRINK; }
            set { blnAUTO_SHRINK = value; }
        }

        public bool AUTO_UPDATE_STATISTICS
        {
            get { return blnAUTO_UPDATE_STATISTICS; }
            set { blnAUTO_UPDATE_STATISTICS = value; }
        }

        public bool CURSOR_CLOSE_ON_COMMIT
        {
            get { return blnCURSOR_CLOSE_ON_COMMIT; }
            set { blnCURSOR_CLOSE_ON_COMMIT = value; }
        }

        public bool CONCAT_NULL_YIELDS_NULL
        {
            get { return blnCONCAT_NULL_YIELDS_NULL; }
            set { blnCONCAT_NULL_YIELDS_NULL = value; }
        }

        public bool NUMERIC_ROUNDABORT
        {
            get { return blnNUMERIC_ROUNDABORT; }
            set { blnNUMERIC_ROUNDABORT = value; }
        }

        public bool QUOTED_IDENTIFIER
        {
            get { return blnQUOTED_IDENTIFIER; }
            set { blnQUOTED_IDENTIFIER = value; }
        }

        public bool RECURSIVE_TRIGGERS
        {
            get { return blnRECURSIVE_TRIGGERS; }
            set { blnRECURSIVE_TRIGGERS = value; }
        }

        public bool ENABLE_BROKER
        {
            get { return blnENABLE_BROKER; }
            set { blnENABLE_BROKER = value; }
        }

        public bool AUTO_UPDATE_STATISTICS_ASYNC
        {
            get { return blnAUTO_UPDATE_STATISTICS_ASYNC; }
            set { blnAUTO_UPDATE_STATISTICS_ASYNC = value; }
        }

        public bool DATE_CORRELATION_OPTIMIZATION
        {
            get { return blnDATE_CORRELATION_OPTIMIZATION; }
            set { blnDATE_CORRELATION_OPTIMIZATION = value; }
        }

        public bool TRUSTWORTHY
        {
            get { return blnTRUSTWORTHY; }
            set { blnTRUSTWORTHY = value; }
        }

        public bool ALLOW_SNAPSHOT_ISOLATION
        {
            get { return blnALLOW_SNAPSHOT_ISOLATION; }
            set { blnALLOW_SNAPSHOT_ISOLATION = value; }
        }

        public bool READ_WRITE
        {
            get { return blnREAD_WRITE; }
            set { blnREAD_WRITE = value; }
        }

        public bool MULTI_USER
        {
            get { return blnMULTI_USER; }
            set { blnMULTI_USER = value; }
        }

        public bool DB_CHAINING
        {
            get { return blnDB_CHAINING; }
            set { blnDB_CHAINING = value; }
        }

        public override string GenerateCode()
        {
            throw new NotImplementedException();
        }

        public override List<SQLTableCode> Tables
        {
            get
            {
                return _Tables;
            }
        }

        public override List<SQLProcedureCode> Procedures
        {
            get
            {
                return _Procedures;
            }
        }
    }
}
